<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE BangPatterns #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE MagicHash #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE UnboxedTuples #-}</span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE UnliftedFFITypes #-}</span><span>
</span><span id="line-7"></span><span class="hs-pragma">{-# LANGUAGE NegativeLiterals #-}</span><span>
</span><span id="line-8"></span><span class="hs-pragma">{-# LANGUAGE ExplicitForAll #-}</span><span>
</span><span id="line-9"></span><span class="hs-pragma">{-# LANGUAGE FlexibleInstances #-}</span><span>
</span><span id="line-10"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-11"></span><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span>
</span><span id="line-12"></span><span class="hs-pragma">{-# LANGUAGE BlockArguments #-}</span><span>
</span><span id="line-13"></span><span class="hs-pragma">{-# LANGUAGE BinaryLiterals #-}</span><span>
</span><span id="line-14"></span><span class="hs-pragma">{-# OPTIONS_GHC -fexpose-all-unfoldings #-}</span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Num.Primitives</span><span>
</span><span id="line-17"></span><span>   </span><span class="hs-special">(</span><span>
</span><span id="line-18"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Bool#</span></span><span>
</span><span id="line-19"></span><span>   </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier">Bool#</span></a></span><span>
</span><span id="line-20"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#%26%26%23"><span class="hs-operator">(&amp;&amp;#)</span></a></span><span>
</span><span id="line-21"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#%7C%7C%23"><span class="hs-operator">(||#)</span></a></span><span>
</span><span id="line-22"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#notB%23"><span class="hs-identifier">notB#</span></a></span><span>
</span><span id="line-23"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Int#</span></span><span>
</span><span id="line-24"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#testBitI%23"><span class="hs-identifier">testBitI#</span></a></span><span>
</span><span id="line-25"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#minI%23"><span class="hs-identifier">minI#</span></a></span><span>
</span><span id="line-26"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#maxI%23"><span class="hs-identifier">maxI#</span></a></span><span>
</span><span id="line-27"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#sgnI%23"><span class="hs-identifier">sgnI#</span></a></span><span>
</span><span id="line-28"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#absI%23"><span class="hs-identifier">absI#</span></a></span><span>
</span><span id="line-29"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#cmpI%23"><span class="hs-identifier">cmpI#</span></a></span><span>
</span><span id="line-30"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#intEncodeDouble%23"><span class="hs-identifier">intEncodeDouble#</span></a></span><span>
</span><span id="line-31"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#popCntI%23"><span class="hs-identifier">popCntI#</span></a></span><span>
</span><span id="line-32"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Word#</span></span><span>
</span><span id="line-33"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#andNot%23"><span class="hs-identifier">andNot#</span></a></span><span>
</span><span id="line-34"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#cmpW%23"><span class="hs-identifier">cmpW#</span></a></span><span>
</span><span id="line-35"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#bitW%23"><span class="hs-identifier">bitW#</span></a></span><span>
</span><span id="line-36"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#maxW%23"><span class="hs-identifier">maxW#</span></a></span><span>
</span><span id="line-37"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#minW%23"><span class="hs-identifier">minW#</span></a></span><span>
</span><span id="line-38"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#testBitW%23"><span class="hs-identifier">testBitW#</span></a></span><span>
</span><span id="line-39"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#shiftRW%23"><span class="hs-identifier">shiftRW#</span></a></span><span>
</span><span id="line-40"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#plusWord3%23"><span class="hs-identifier">plusWord3#</span></a></span><span>
</span><span id="line-41"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#plusWord12%23"><span class="hs-identifier">plusWord12#</span></a></span><span>
</span><span id="line-42"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#quotRemWord3%23"><span class="hs-identifier">quotRemWord3#</span></a></span><span>
</span><span id="line-43"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromAbsInt%23"><span class="hs-identifier">wordFromAbsInt#</span></a></span><span>
</span><span id="line-44"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordLog2%23"><span class="hs-identifier">wordLog2#</span></a></span><span>
</span><span id="line-45"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordLogBase%23"><span class="hs-identifier">wordLogBase#</span></a></span><span>
</span><span id="line-46"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordSizeInBase%23"><span class="hs-identifier">wordSizeInBase#</span></a></span><span>
</span><span id="line-47"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordIsPowerOf2%23"><span class="hs-identifier">wordIsPowerOf2#</span></a></span><span>
</span><span id="line-48"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordEncodeDouble%23"><span class="hs-identifier">wordEncodeDouble#</span></a></span><span>
</span><span id="line-49"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordReverseBits%23"><span class="hs-identifier">wordReverseBits#</span></a></span><span>
</span><span id="line-50"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordReverseBits32%23"><span class="hs-identifier">wordReverseBits32#</span></a></span><span>
</span><span id="line-51"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordReverseBytes%23"><span class="hs-identifier">wordReverseBytes#</span></a></span><span>
</span><span id="line-52"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** Addr import/export</span></span><span>
</span><span id="line-53"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromAddr%23"><span class="hs-identifier">wordFromAddr#</span></a></span><span>
</span><span id="line-54"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromAddrLE%23"><span class="hs-identifier">wordFromAddrLE#</span></a></span><span>
</span><span id="line-55"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromAddrBE%23"><span class="hs-identifier">wordFromAddrBE#</span></a></span><span>
</span><span id="line-56"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordToAddr%23"><span class="hs-identifier">wordToAddr#</span></a></span><span>
</span><span id="line-57"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordToAddrLE%23"><span class="hs-identifier">wordToAddrLE#</span></a></span><span>
</span><span id="line-58"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordToAddrBE%23"><span class="hs-identifier">wordToAddrBE#</span></a></span><span>
</span><span id="line-59"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordWriteAddrLE%23"><span class="hs-identifier">wordWriteAddrLE#</span></a></span><span>
</span><span id="line-60"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordWriteAddrBE%23"><span class="hs-identifier">wordWriteAddrBE#</span></a></span><span>
</span><span id="line-61"></span><span>   </span><span class="annot"><span class="hs-comment">-- ** ByteArray import/export</span></span><span>
</span><span id="line-62"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromByteArray%23"><span class="hs-identifier">wordFromByteArray#</span></a></span><span>
</span><span id="line-63"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromByteArrayLE%23"><span class="hs-identifier">wordFromByteArrayLE#</span></a></span><span>
</span><span id="line-64"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromByteArrayBE%23"><span class="hs-identifier">wordFromByteArrayBE#</span></a></span><span>
</span><span id="line-65"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordToMutableByteArray%23"><span class="hs-identifier">wordToMutableByteArray#</span></a></span><span>
</span><span id="line-66"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordToMutableByteArrayLE%23"><span class="hs-identifier">wordToMutableByteArrayLE#</span></a></span><span>
</span><span id="line-67"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordToMutableByteArrayBE%23"><span class="hs-identifier">wordToMutableByteArrayBE#</span></a></span><span>
</span><span id="line-68"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordWriteMutableByteArrayLE%23"><span class="hs-identifier">wordWriteMutableByteArrayLE#</span></a></span><span>
</span><span id="line-69"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#wordWriteMutableByteArrayBE%23"><span class="hs-identifier">wordWriteMutableByteArrayBE#</span></a></span><span>
</span><span id="line-70"></span><span>   </span><span class="annot"><span class="hs-comment">-- * Exception</span></span><span>
</span><span id="line-71"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.Exception.html#raiseUnderflow"><span class="hs-identifier">raiseUnderflow</span></a></span><span>
</span><span id="line-72"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#raiseUnderflow_Word%23"><span class="hs-identifier">raiseUnderflow_Word#</span></a></span><span>
</span><span id="line-73"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.Exception.html#raiseDivZero"><span class="hs-identifier">raiseDivZero</span></a></span><span>
</span><span id="line-74"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#raiseDivZero_Word%23"><span class="hs-identifier">raiseDivZero_Word#</span></a></span><span>
</span><span id="line-75"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#unexpectedValue"><span class="hs-identifier">unexpectedValue</span></a></span><span>
</span><span id="line-76"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#unexpectedValue_Int%23"><span class="hs-identifier">unexpectedValue_Int#</span></a></span><span>
</span><span id="line-77"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#unexpectedValue_Word%23"><span class="hs-identifier">unexpectedValue_Word#</span></a></span><span>
</span><span id="line-78"></span><span>   </span><span class="annot"><span class="hs-comment">-- * IO</span></span><span>
</span><span id="line-79"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#ioWord%23"><span class="hs-identifier">ioWord#</span></a></span><span>
</span><span id="line-80"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#ioInt%23"><span class="hs-identifier">ioInt#</span></a></span><span>
</span><span id="line-81"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#ioVoid"><span class="hs-identifier">ioVoid</span></a></span><span>
</span><span id="line-82"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#ioBool"><span class="hs-identifier">ioBool</span></a></span><span>
</span><span id="line-83"></span><span>   </span><span class="hs-special">)</span><span>
</span><span id="line-84"></span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;MachDeps.h&quot;
</span><span class="hs-cpp">#include &quot;WordSize.h&quot;
</span><span>
</span><span id="line-89"></span><span class="hs-comment">-- Required for WORDS_BIGENDIAN</span><span class="hs-cpp">
#include &lt;ghcautoconf.h&gt;
</span><span class="hs-cpp">
#if (__GLASGOW_HASKELL__ &lt; 811)
</span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">GHC.Magic</span><span class="hs-cpp">
#else
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.Exception.html#"><span class="hs-identifier">GHC.Prim.Exception</span></a></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-98"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#"><span class="hs-identifier">GHC.Prim</span></a></span><span>
</span><span id="line-99"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#"><span class="hs-identifier">GHC.Types</span></a></span><span>
</span><span id="line-100"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Tuple.html#"><span class="hs-identifier">GHC.Tuple</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- See Note [Depend on GHC.Tuple] in GHC.Base</span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span class="hs-keyword">default</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span class="hs-comment">----------------------------------</span><span>
</span><span id="line-105"></span><span class="hs-comment">-- Bool#</span><span>
</span><span id="line-106"></span><span class="hs-comment">----------------------------------</span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="hs-keyword">type</span><span> </span><span id="Bool%23"><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-var">Bool#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-109"></span><span>
</span><span id="line-110"></span><span class="annot"><a href="GHC.Num.Primitives.html#%26%26%23"><span class="hs-operator hs-type">(&amp;&amp;#)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-111"></span><span id="%26%26%23"><span class="annot"><span class="annottext">&amp;&amp;# :: Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#%26%26%23"><span class="hs-operator hs-var hs-var">(&amp;&amp;#)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#andI%23"><span class="hs-identifier hs-var">andI#</span></a></span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="annot"><a href="GHC.Num.Primitives.html#%7C%7C%23"><span class="hs-operator hs-type">(||#)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-114"></span><span id="%7C%7C%23"><span class="annot"><span class="annottext">||# :: Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#%7C%7C%23"><span class="hs-operator hs-var hs-var">(||#)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#orI%23"><span class="hs-identifier hs-var">orI#</span></a></span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span class="annot"><a href="GHC.Num.Primitives.html#notB%23"><span class="hs-identifier hs-type">notB#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-117"></span><span id="notB%23"><span class="annot"><span class="annottext">notB# :: Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#notB%23"><span class="hs-identifier hs-var hs-var">notB#</span></a></span></span><span> </span><span id="local-6989586621679032467"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032467"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032467"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#xorI%23"><span class="hs-operator hs-var">`xorI#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span>
</span><span id="line-118"></span><span>
</span><span id="line-119"></span><span class="hs-keyword">infixr</span><span> </span><span class="hs-number">3</span><span>  </span><span class="annot"><a href="GHC.Num.Primitives.html#%26%26%23"><span class="hs-operator hs-type">&amp;&amp;#</span></a></span><span>
</span><span id="line-120"></span><span class="hs-keyword">infixr</span><span> </span><span class="hs-number">2</span><span>  </span><span class="annot"><a href="GHC.Num.Primitives.html#%7C%7C%23"><span class="hs-operator hs-type">||#</span></a></span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span class="hs-comment">----------------------------------</span><span>
</span><span id="line-124"></span><span class="hs-comment">-- Int#</span><span>
</span><span id="line-125"></span><span class="hs-comment">----------------------------------</span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span class="hs-comment">-- | Branchless `abs`</span><span>
</span><span id="line-128"></span><span class="annot"><a href="GHC.Num.Primitives.html#absI%23"><span class="hs-identifier hs-type">absI#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-129"></span><span id="absI%23"><span class="annot"><span class="annottext">absI# :: Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#absI%23"><span class="hs-identifier hs-var hs-var">absI#</span></a></span></span><span> </span><span id="local-6989586621679032466"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032466"><span class="hs-identifier hs-var">i#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032466"><span class="hs-identifier hs-var">i#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#xorI%23"><span class="hs-operator hs-var">`xorI#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032465"><span class="hs-identifier hs-var">nsign</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032465"><span class="hs-identifier hs-var">nsign</span></a></span><span>
</span><span id="line-130"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-131"></span><span>    </span><span class="hs-comment">-- nsign = negateInt# (i# &lt;# 0#)</span><span>
</span><span id="line-132"></span><span>    </span><span id="local-6989586621679032465"><span class="annot"><span class="annottext">nsign :: Bool#
</span><a href="#local-6989586621679032465"><span class="hs-identifier hs-var hs-var">nsign</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftRA%23"><span class="hs-identifier hs-var">uncheckedIShiftRA#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032466"><span class="hs-identifier hs-var">i#</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-identifier">WORD_SIZE_IN_BITS#</span><span> </span><span class="hs-operator">-#</span><span> </span><span class="hs-number">1#</span><span class="hs-special">)</span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span class="hs-comment">-- | Branchless `signum`</span><span>
</span><span id="line-135"></span><span class="annot"><a href="GHC.Num.Primitives.html#sgnI%23"><span class="hs-identifier hs-type">sgnI#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-136"></span><span id="sgnI%23"><span class="annot"><span class="annottext">sgnI# :: Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#sgnI%23"><span class="hs-identifier hs-var hs-var">sgnI#</span></a></span></span><span> </span><span id="local-6989586621679032464"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032464"><span class="hs-identifier hs-var">x#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032464"><span class="hs-identifier hs-var">x#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%23"><span class="hs-operator hs-var">&gt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032464"><span class="hs-identifier hs-var">x#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-comment">-- | Population count</span><span>
</span><span id="line-139"></span><span class="annot"><a href="GHC.Num.Primitives.html#popCntI%23"><span class="hs-identifier hs-type">popCntI#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-140"></span><span id="popCntI%23"><span class="annot"><span class="annottext">popCntI# :: Bool# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#popCntI%23"><span class="hs-identifier hs-var hs-var">popCntI#</span></a></span></span><span> </span><span id="local-6989586621679032463"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032463"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#popCnt%23"><span class="hs-identifier hs-var">popCnt#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032463"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-141"></span><span>
</span><span id="line-142"></span><span class="hs-comment">-- | Branchless comparison</span><span>
</span><span id="line-143"></span><span class="annot"><a href="GHC.Num.Primitives.html#cmpI%23"><span class="hs-identifier hs-type">cmpI#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-144"></span><span id="cmpI%23"><span class="annot"><span class="annottext">cmpI# :: Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#cmpI%23"><span class="hs-identifier hs-var hs-var">cmpI#</span></a></span></span><span> </span><span id="local-6989586621679032462"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032462"><span class="hs-identifier hs-var">x#</span></a></span></span><span> </span><span id="local-6989586621679032461"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032461"><span class="hs-identifier hs-var">y#</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032462"><span class="hs-identifier hs-var">x#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%23"><span class="hs-operator hs-var">&gt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032461"><span class="hs-identifier hs-var">y#</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032462"><span class="hs-identifier hs-var">x#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%23"><span class="hs-operator hs-var">&lt;#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032461"><span class="hs-identifier hs-var">y#</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-145"></span><span>
</span><span id="line-146"></span><span class="annot"><a href="GHC.Num.Primitives.html#testBitI%23"><span class="hs-identifier hs-type">testBitI#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-147"></span><span id="testBitI%23"><span class="annot"><span class="annottext">testBitI# :: Bool# -&gt; Word# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#testBitI%23"><span class="hs-identifier hs-var hs-var">testBitI#</span></a></span></span><span> </span><span id="local-6989586621679032460"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032460"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679032459"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032459"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftL%23"><span class="hs-identifier hs-var">uncheckedIShiftL#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032459"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#andI%23"><span class="hs-operator hs-var">`andI#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032460"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2F%3D%23"><span class="hs-operator hs-var">/=#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span class="annot"><a href="GHC.Num.Primitives.html#minI%23"><span class="hs-identifier hs-type">minI#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-150"></span><span id="minI%23"><span class="annot"><span class="annottext">minI# :: Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#minI%23"><span class="hs-identifier hs-var hs-var">minI#</span></a></span></span><span> </span><span id="local-6989586621679032458"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032458"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679032457"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032457"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032458"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3C%3D%23"><span class="hs-operator hs-var">&lt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032457"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032458"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-151"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032457"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-152"></span><span>
</span><span id="line-153"></span><span class="annot"><a href="GHC.Num.Primitives.html#maxI%23"><span class="hs-identifier hs-type">maxI#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-154"></span><span id="maxI%23"><span class="annot"><span class="annottext">maxI# :: Bool# -&gt; Bool# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#maxI%23"><span class="hs-identifier hs-var hs-var">maxI#</span></a></span></span><span> </span><span id="local-6989586621679032455"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032455"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679032454"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032454"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032455"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032454"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032455"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-155"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032454"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span class="hs-comment">-- | Encode (# Int# mantissa, Int# exponent #) into a Double#.</span><span>
</span><span id="line-158"></span><span class="hs-comment">--</span><span>
</span><span id="line-159"></span><span class="hs-comment">-- (provided by GHC's RTS)</span><span>
</span><span id="line-160"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;__int_encodeDouble&quot;</span></span><span>
</span><span id="line-161"></span><span>   </span><span id="intEncodeDouble%23"><span class="annot"><a href="GHC.Num.Primitives.html#intEncodeDouble%23"><span class="hs-identifier hs-var">intEncodeDouble#</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Double%23"><span class="hs-identifier hs-type">Double#</span></a></span><span>
</span><span id="line-162"></span><span>
</span><span id="line-163"></span><span class="hs-comment">----------------------------------</span><span>
</span><span id="line-164"></span><span class="hs-comment">-- Word#</span><span>
</span><span id="line-165"></span><span class="hs-comment">----------------------------------</span><span>
</span><span id="line-166"></span><span>
</span><span id="line-167"></span><span class="annot"><a href="GHC.Num.Primitives.html#andNot%23"><span class="hs-identifier hs-type">andNot#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-168"></span><span id="andNot%23"><span class="annot"><span class="annottext">andNot# :: Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#andNot%23"><span class="hs-identifier hs-var hs-var">andNot#</span></a></span></span><span> </span><span id="local-6989586621679032453"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032453"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679032452"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032452"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032453"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#not%23"><span class="hs-identifier hs-var">not#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032452"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span class="annot"><a href="GHC.Num.Primitives.html#cmpW%23"><span class="hs-identifier hs-type">cmpW#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Ordering"><span class="hs-identifier hs-type">Ordering</span></a></span><span>
</span><span id="line-171"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#cmpW%23"><span class="hs-pragma hs-type">cmpW#</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-172"></span><span id="cmpW%23"><span class="annot"><span class="annottext">cmpW# :: Word# -&gt; Word# -&gt; Ordering
</span><a href="GHC.Num.Primitives.html#cmpW%23"><span class="hs-identifier hs-var hs-var">cmpW#</span></a></span></span><span> </span><span id="local-6989586621679032451"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032451"><span class="hs-identifier hs-var">x#</span></a></span></span><span> </span><span id="local-6989586621679032450"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032450"><span class="hs-identifier hs-var">y#</span></a></span></span><span>
</span><span id="line-173"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032451"><span class="hs-identifier hs-var">x#</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#ltWord%23"><span class="hs-operator hs-var">`ltWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032450"><span class="hs-identifier hs-var">y#</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#LT"><span class="hs-identifier hs-var">LT</span></a></span><span>
</span><span id="line-174"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032451"><span class="hs-identifier hs-var">x#</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#eqWord%23"><span class="hs-operator hs-var">`eqWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032450"><span class="hs-identifier hs-var">y#</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#EQ"><span class="hs-identifier hs-var">EQ</span></a></span><span>
</span><span id="line-175"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><a href="../../ghc-prim/src/GHC.Types.html#GT"><span class="hs-identifier hs-var">GT</span></a></span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span class="hs-comment">-- | Return the absolute value of the Int# in a Word#</span><span>
</span><span id="line-178"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromAbsInt%23"><span class="hs-identifier hs-type">wordFromAbsInt#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-179"></span><span id="wordFromAbsInt%23"><span class="annot"><span class="annottext">wordFromAbsInt# :: Bool# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordFromAbsInt%23"><span class="hs-identifier hs-var hs-var">wordFromAbsInt#</span></a></span></span><span> </span><span id="local-6989586621679032449"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032449"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-180"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032449"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3E%3D%23"><span class="hs-operator hs-var">&gt;=#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032449"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-181"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#negateInt%23"><span class="hs-identifier hs-var">negateInt#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032449"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span class="annot"><a href="GHC.Num.Primitives.html#minW%23"><span class="hs-identifier hs-type">minW#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-184"></span><span id="minW%23"><span class="annot"><span class="annottext">minW# :: Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#minW%23"><span class="hs-identifier hs-var hs-var">minW#</span></a></span></span><span> </span><span id="local-6989586621679032448"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032448"><span class="hs-identifier hs-var">x#</span></a></span></span><span> </span><span id="local-6989586621679032447"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032447"><span class="hs-identifier hs-var">y#</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032448"><span class="hs-identifier hs-var">x#</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#leWord%23"><span class="hs-operator hs-var">`leWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032447"><span class="hs-identifier hs-var">y#</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032448"><span class="hs-identifier hs-var">x#</span></a></span><span>
</span><span id="line-185"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032447"><span class="hs-identifier hs-var">y#</span></a></span><span>
</span><span id="line-186"></span><span>
</span><span id="line-187"></span><span class="annot"><a href="GHC.Num.Primitives.html#maxW%23"><span class="hs-identifier hs-type">maxW#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-188"></span><span id="maxW%23"><span class="annot"><span class="annottext">maxW# :: Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#maxW%23"><span class="hs-identifier hs-var hs-var">maxW#</span></a></span></span><span> </span><span id="local-6989586621679032446"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032446"><span class="hs-identifier hs-var">x#</span></a></span></span><span> </span><span id="local-6989586621679032445"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032445"><span class="hs-identifier hs-var">y#</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032446"><span class="hs-identifier hs-var">x#</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#gtWord%23"><span class="hs-operator hs-var">`gtWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032445"><span class="hs-identifier hs-var">y#</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032446"><span class="hs-identifier hs-var">x#</span></a></span><span>
</span><span id="line-189"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032445"><span class="hs-identifier hs-var">y#</span></a></span><span>
</span><span id="line-190"></span><span>
</span><span id="line-191"></span><span class="annot"><a href="GHC.Num.Primitives.html#bitW%23"><span class="hs-identifier hs-type">bitW#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-192"></span><span id="bitW%23"><span class="annot"><span class="annottext">bitW# :: Bool# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#bitW%23"><span class="hs-identifier hs-var hs-var">bitW#</span></a></span></span><span> </span><span id="local-6989586621679032444"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032444"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032444"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-193"></span><span>
</span><span id="line-194"></span><span class="annot"><a href="GHC.Num.Primitives.html#testBitW%23"><span class="hs-identifier hs-type">testBitW#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span>
</span><span id="line-195"></span><span id="testBitW%23"><span class="annot"><span class="annottext">testBitW# :: Word# -&gt; Word# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#testBitW%23"><span class="hs-identifier hs-var hs-var">testBitW#</span></a></span></span><span> </span><span id="local-6989586621679032443"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032443"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679032442"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032442"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032443"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032442"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#neWord%23"><span class="hs-operator hs-var">`neWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span class="hs-comment">-- | Safe right shift for Word#</span><span>
</span><span id="line-198"></span><span class="annot"><a href="GHC.Num.Primitives.html#shiftRW%23"><span class="hs-identifier hs-type">shiftRW#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-199"></span><span id="shiftRW%23"><span class="annot"><span class="annottext">shiftRW# :: Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#shiftRW%23"><span class="hs-identifier hs-var hs-var">shiftRW#</span></a></span></span><span> </span><span id="local-6989586621679032441"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032441"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679032440"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032440"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-200"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032440"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#geWord%23"><span class="hs-operator hs-var">`geWord#`</span></a></span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BITS##</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-number">0##</span><span>
</span><span id="line-201"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                                      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032441"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032440"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-202"></span><span>
</span><span id="line-203"></span><span class="hs-comment">-- | (h,l) &lt;- a + (hb,lb)</span><span>
</span><span id="line-204"></span><span class="annot"><a href="GHC.Num.Primitives.html#plusWord12%23"><span class="hs-identifier hs-type">plusWord12#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-205"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#plusWord12%23"><span class="hs-pragma hs-type">plusWord12#</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-206"></span><span id="plusWord12%23"><span class="annot"><span class="annottext">plusWord12# :: Word# -&gt; (# Word#, Word# #) -&gt; (# Word#, Word# #)
</span><a href="GHC.Num.Primitives.html#plusWord12%23"><span class="hs-identifier hs-var hs-var">plusWord12#</span></a></span></span><span> </span><span id="local-6989586621679032439"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032439"><span class="hs-identifier hs-var">a0</span></a></span></span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032438"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032438"><span class="hs-identifier hs-var">b1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679032437"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032437"><span class="hs-identifier hs-var">b0</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032436"><span class="hs-identifier hs-var">m1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032435"><span class="hs-identifier hs-var">m0</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-207"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-208"></span><span>      </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032434"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032434"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032435"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032435"><span class="hs-identifier hs-var">m0</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord2%23"><span class="hs-identifier hs-var">plusWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032439"><span class="hs-identifier hs-var">a0</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032437"><span class="hs-identifier hs-var">b0</span></a></span><span>
</span><span id="line-209"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032436"><span class="annot"><span class="annottext">m1 :: Word#
</span><a href="#local-6989586621679032436"><span class="hs-identifier hs-var hs-var">m1</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-identifier hs-var">plusWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032434"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032438"><span class="hs-identifier hs-var">b1</span></a></span><span>
</span><span id="line-210"></span><span>
</span><span id="line-211"></span><span class="hs-comment">-- | Add 3 values together</span><span>
</span><span id="line-212"></span><span class="annot"><a href="GHC.Num.Primitives.html#plusWord3%23"><span class="hs-identifier hs-type">plusWord3#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-213"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#plusWord3%23"><span class="hs-pragma hs-type">plusWord3#</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-214"></span><span id="plusWord3%23"><span class="annot"><span class="annottext">plusWord3# :: Word# -&gt; Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="GHC.Num.Primitives.html#plusWord3%23"><span class="hs-identifier hs-var hs-var">plusWord3#</span></a></span></span><span> </span><span id="local-6989586621679032433"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032433"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679032432"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032432"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679032431"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032431"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032430"><span class="hs-identifier hs-var">r1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032429"><span class="hs-identifier hs-var">r0</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-215"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-216"></span><span>      </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032428"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032428"><span class="hs-identifier hs-var">t1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032427"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032427"><span class="hs-identifier hs-var">t0</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord2%23"><span class="hs-identifier hs-var">plusWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032433"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032432"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-217"></span><span>      </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032426"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032426"><span class="hs-identifier hs-var">t2</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032429"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032429"><span class="hs-identifier hs-var">r0</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord2%23"><span class="hs-identifier hs-var">plusWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032427"><span class="hs-identifier hs-var">t0</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032431"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-218"></span><span>      </span><span class="hs-glyph">!</span><span id="local-6989586621679032430"><span class="annot"><span class="annottext">r1 :: Word#
</span><a href="#local-6989586621679032430"><span class="hs-identifier hs-var hs-var">r1</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-identifier hs-var">plusWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032428"><span class="hs-identifier hs-var">t1</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032426"><span class="hs-identifier hs-var">t2</span></a></span><span>
</span><span id="line-219"></span><span>
</span><span id="line-220"></span><span>
</span><span id="line-221"></span><span class="hs-comment">-- | 2-by-1 large division</span><span>
</span><span id="line-222"></span><span class="hs-comment">--</span><span>
</span><span id="line-223"></span><span class="hs-comment">-- Requires:</span><span>
</span><span id="line-224"></span><span class="hs-comment">--    b0 /= 0</span><span>
</span><span id="line-225"></span><span class="hs-comment">--    a1 &gt;= b0 (not required, but if not q1=0)</span><span>
</span><span id="line-226"></span><span class="annot"><a href="GHC.Num.Primitives.html#quotRemWord3%23"><span class="hs-identifier hs-type">quotRemWord3#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span><span class="hs-special">,</span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-227"></span><span id="quotRemWord3%23"><span class="annot"><span class="annottext">quotRemWord3# :: (# Word#, Word# #) -&gt; Word# -&gt; (# (# Word#, Word# #), Word# #)
</span><a href="GHC.Num.Primitives.html#quotRemWord3%23"><span class="hs-identifier hs-var hs-var">quotRemWord3#</span></a></span></span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032425"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032425"><span class="hs-identifier hs-var">a1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679032424"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032424"><span class="hs-identifier hs-var">a0</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span id="local-6989586621679032423"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032423"><span class="hs-identifier hs-var">b0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032422"><span class="hs-identifier hs-var">q1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032421"><span class="hs-identifier hs-var">q0</span></a></span><span> </span><span class="hs-special">#)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032420"><span class="hs-identifier hs-var">r0</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-228"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-229"></span><span>      </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032422"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032422"><span class="hs-identifier hs-var">q1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032419"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032419"><span class="hs-identifier hs-var">r'</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#quotRemWord%23"><span class="hs-identifier hs-var">quotRemWord#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032425"><span class="hs-identifier hs-var">a1</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032423"><span class="hs-identifier hs-var">b0</span></a></span><span>
</span><span id="line-230"></span><span>      </span><span class="hs-glyph">!</span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032421"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032421"><span class="hs-identifier hs-var">q0</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032420"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032420"><span class="hs-identifier hs-var">r0</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#quotRemWord2%23"><span class="hs-identifier hs-var">quotRemWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032419"><span class="hs-identifier hs-var">r'</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032424"><span class="hs-identifier hs-var">a0</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032423"><span class="hs-identifier hs-var">b0</span></a></span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span class="hs-comment">-- | Encode (# Word# mantissa, Int# exponent #) into a Double#.</span><span>
</span><span id="line-235"></span><span class="hs-comment">--</span><span>
</span><span id="line-236"></span><span class="hs-comment">-- (provided by GHC's RTS)</span><span>
</span><span id="line-237"></span><span class="hs-keyword">foreign</span><span> </span><span class="hs-keyword">import</span><span> </span><span class="annot"><span class="hs-keyword">ccall</span></span><span> </span><span class="annot"><span class="hs-keyword">unsafe</span></span><span> </span><span class="annot"><span class="hs-string">&quot;__word_encodeDouble&quot;</span></span><span>
</span><span id="line-238"></span><span>   </span><span id="wordEncodeDouble%23"><span class="annot"><a href="GHC.Num.Primitives.html#wordEncodeDouble%23"><span class="hs-identifier hs-var">wordEncodeDouble#</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Double%23"><span class="hs-identifier hs-type">Double#</span></a></span><span>
</span><span id="line-239"></span><span>
</span><span id="line-240"></span><span class="hs-comment">-- | Compute base-2 log of 'Word#'</span><span>
</span><span id="line-241"></span><span class="hs-comment">--</span><span>
</span><span id="line-242"></span><span class="hs-comment">-- This is internally implemented as count-leading-zeros machine instruction.</span><span>
</span><span id="line-243"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordLog2%23"><span class="hs-identifier hs-type">wordLog2#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-244"></span><span id="wordLog2%23"><span class="annot"><span class="annottext">wordLog2# :: Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordLog2%23"><span class="hs-identifier hs-var hs-var">wordLog2#</span></a></span></span><span> </span><span id="local-6989586621679032418"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032418"><span class="hs-identifier hs-var">w</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">WORD_SIZE_IN_BITS##</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">minusWord#</span><span class="hs-special">`</span><span> </span><span class="hs-number">1##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">minusWord#</span><span class="hs-special">`</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">clz#</span><span> </span><span class="hs-identifier">w</span><span class="hs-special">)</span><span>
</span><span id="line-245"></span><span>
</span><span id="line-246"></span><span class="hs-comment">-- | Logarithm for an arbitrary base</span><span>
</span><span id="line-247"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordLogBase%23"><span class="hs-identifier hs-type">wordLogBase#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-248"></span><span id="wordLogBase%23"><span class="annot"><span class="annottext">wordLogBase# :: Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordLogBase%23"><span class="hs-identifier hs-var hs-var">wordLogBase#</span></a></span></span><span> </span><span id="local-6989586621679032417"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032417"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679032416"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032416"><span class="hs-identifier hs-var">a</span></a></span></span><span>
</span><span id="line-249"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032417"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#leWord%23"><span class="hs-operator hs-var">`leWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span>
</span><span id="line-250"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Void# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#unexpectedValue_Word%23"><span class="hs-identifier hs-var">unexpectedValue_Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Void#
</span><a href="../../ghc-prim/src/GHC.Prim.html#void%23"><span class="hs-identifier hs-var">void#</span></a></span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">2##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032417"><span class="hs-identifier hs-var">base</span></a></span><span>
</span><span id="line-253"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordLog2%23"><span class="hs-identifier hs-var">wordLog2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032416"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-254"></span><span>
</span><span id="line-255"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-256"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; (# Word#, Word# #)
</span><a href="#local-6989586621679032415"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032417"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032414"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032414"><span class="hs-identifier hs-var">e'</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032414"><span class="hs-identifier hs-var">e'</span></a></span><span>
</span><span id="line-257"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-258"></span><span>      </span><span id="local-6989586621679032413"><span class="annot"><span class="annottext">goSqr :: Word# -&gt; (# Word#, Word# #)
</span><a href="#local-6989586621679032413"><span class="hs-identifier hs-var hs-var">goSqr</span></a></span></span><span> </span><span id="local-6989586621679032412"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032412"><span class="hs-identifier hs-var">pw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; (# Word#, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#timesWord2%23"><span class="hs-identifier hs-var">timesWord2#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032412"><span class="hs-identifier hs-var">pw</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032412"><span class="hs-identifier hs-var">pw</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-259"></span><span>         </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032411"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032411"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; (# Word#, Word# #)
</span><a href="#local-6989586621679032415"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032411"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-260"></span><span>         </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032416"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-261"></span><span>      </span><span id="local-6989586621679032415"><span class="annot"><span class="annottext">go :: Word# -&gt; (# Word#, Word# #)
</span><a href="#local-6989586621679032415"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679032410"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032410"><span class="hs-identifier hs-var">pw</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032416"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#ltWord%23"><span class="hs-operator hs-var">`ltWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032410"><span class="hs-identifier hs-var">pw</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-262"></span><span>         </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032416"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-263"></span><span>         </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; (# Word#, Word# #)
</span><a href="#local-6989586621679032413"><span class="hs-identifier hs-var">goSqr</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032410"><span class="hs-identifier hs-var">pw</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-264"></span><span>            </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032409"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032409"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032408"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032408"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032409"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#ltWord%23"><span class="hs-operator hs-var">`ltWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032410"><span class="hs-identifier hs-var">pw</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-265"></span><span>               </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032409"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">2##</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#timesWord%23"><span class="hs-operator hs-var">`timesWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032408"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-266"></span><span>               </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032409"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#quotWord%23"><span class="hs-operator hs-var">`quotWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032410"><span class="hs-identifier hs-var">pw</span></a></span><span>
</span><span id="line-267"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">2##</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#timesWord%23"><span class="hs-operator hs-var">`timesWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032408"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-268"></span><span>
</span><span id="line-269"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordSizeInBase%23"><span class="hs-identifier hs-type">wordSizeInBase#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-270"></span><span id="wordSizeInBase%23"><span class="annot"><span class="annottext">wordSizeInBase# :: Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordSizeInBase%23"><span class="hs-identifier hs-var hs-var">wordSizeInBase#</span></a></span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span>    </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span>
</span><span id="line-271"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordSizeInBase%23"><span class="hs-identifier hs-var">wordSizeInBase#</span></a></span><span> </span><span id="local-6989586621679032407"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032407"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679032406"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032406"><span class="hs-identifier hs-var">w</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#plusWord%23"><span class="hs-operator hs-var">`plusWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordLogBase%23"><span class="hs-identifier hs-var">wordLogBase#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032407"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032406"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-272"></span><span>
</span><span id="line-273"></span><span class="hs-comment">-- | Indicate if the value is a power of two and which one</span><span>
</span><span id="line-274"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordIsPowerOf2%23"><span class="hs-identifier hs-type">wordIsPowerOf2#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-275"></span><span id="wordIsPowerOf2%23"><span class="annot"><span class="annottext">wordIsPowerOf2# :: Word# -&gt; (# (# #) | Word# #)
</span><a href="GHC.Num.Primitives.html#wordIsPowerOf2%23"><span class="hs-identifier hs-var hs-var">wordIsPowerOf2#</span></a></span></span><span> </span><span id="local-6989586621679032405"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032405"><span class="hs-identifier hs-var">w</span></a></span></span><span>
</span><span id="line-276"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#popCnt%23"><span class="hs-identifier hs-var">popCnt#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032405"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#neWord%23"><span class="hs-operator hs-var">`neWord#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">1##</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-277"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>                              </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#ctz%23"><span class="hs-identifier hs-var">ctz#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032405"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-278"></span><span>
</span><span id="line-279"></span><span class="hs-comment">-- | Reverse bytes in a Word#</span><span>
</span><span id="line-280"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordReverseBytes%23"><span class="hs-identifier hs-type">wordReverseBytes#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-281"></span><span id="wordReverseBytes%23"><span class="annot"><span class="annottext">wordReverseBytes# :: Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordReverseBytes%23"><span class="hs-identifier hs-var hs-var">wordReverseBytes#</span></a></span></span><span> </span><span id="local-6989586621679032404"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032404"><span class="hs-identifier hs-var">x0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032403"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-282"></span><span>   </span><span class="hs-keyword">where</span><span class="hs-cpp">
#if WORD_SIZE_IN_BITS == 64
</span><span>      </span><span id="local-6989586621679032402"><span class="annot"><span class="annottext">x1 :: Word#
</span><a href="#local-6989586621679032402"><span class="hs-identifier hs-var hs-var">x1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032404"><span class="hs-identifier hs-var">x0</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0x00FF00FF00FF00FF##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">8#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032404"><span class="hs-identifier hs-var">x0</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xFF00FF00FF00FF00##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">8#</span></span><span class="hs-special">)</span><span>
</span><span id="line-285"></span><span>      </span><span id="local-6989586621679032401"><span class="annot"><span class="annottext">x2 :: Word#
</span><a href="#local-6989586621679032401"><span class="hs-identifier hs-var hs-var">x2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032402"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0x0000FFFF0000FFFF##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">16#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032402"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xFFFF0000FFFF0000##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">16#</span></span><span class="hs-special">)</span><span>
</span><span id="line-286"></span><span>      </span><span id="local-6989586621679032403"><span class="annot"><span class="annottext">r :: Word#
</span><a href="#local-6989586621679032403"><span class="hs-identifier hs-var hs-var">r</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032401"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0x00000000FFFFFFFF##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">32#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032401"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xFFFFFFFF00000000##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">32#</span></span><span class="hs-special">)</span><span class="hs-cpp">
#else
</span><span>      </span><span class="hs-identifier">x1</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">x0</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">and#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0x00FF00FF##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">uncheckedShiftL#</span><span class="hs-special">`</span><span>  </span><span class="hs-number">8#</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">or#</span><span class="hs-special">`</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">x0</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">and#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0xFF00FF00##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">uncheckedShiftRL#</span><span class="hs-special">`</span><span>  </span><span class="hs-number">8#</span><span class="hs-special">)</span><span>
</span><span id="line-289"></span><span>      </span><span class="hs-identifier">r</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">x1</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">and#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0x0000FFFF##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">uncheckedShiftL#</span><span class="hs-special">`</span><span> </span><span class="hs-number">16#</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">or#</span><span class="hs-special">`</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">x1</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">and#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0xFFFF0000##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">uncheckedShiftRL#</span><span class="hs-special">`</span><span> </span><span class="hs-number">16#</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-292"></span><span>
</span><span id="line-293"></span><span class="hs-comment">-- | Reverse bits in a Word#</span><span>
</span><span id="line-294"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordReverseBits%23"><span class="hs-identifier hs-type">wordReverseBits#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-295"></span><span id="wordReverseBits%23"><span class="annot"><span class="annottext">wordReverseBits# :: Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordReverseBits%23"><span class="hs-identifier hs-var hs-var">wordReverseBits#</span></a></span></span><span> </span><span id="local-6989586621679032400"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032400"><span class="hs-identifier hs-var">x0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032399"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-296"></span><span>   </span><span class="hs-keyword">where</span><span class="hs-cpp">
#if WORD_SIZE_IN_BITS == 64
</span><span>      </span><span id="local-6989586621679032398"><span class="annot"><span class="annottext">x1 :: Word#
</span><a href="#local-6989586621679032398"><span class="hs-identifier hs-var hs-var">x1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032400"><span class="hs-identifier hs-var">x0</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0x5555555555555555##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032400"><span class="hs-identifier hs-var">x0</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xAAAAAAAAAAAAAAAA##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-299"></span><span>      </span><span id="local-6989586621679032397"><span class="annot"><span class="annottext">x2 :: Word#
</span><a href="#local-6989586621679032397"><span class="hs-identifier hs-var hs-var">x2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032398"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0x3333333333333333##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">2#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032398"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xCCCCCCCCCCCCCCCC##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">2#</span></span><span class="hs-special">)</span><span>
</span><span id="line-300"></span><span>      </span><span id="local-6989586621679032396"><span class="annot"><span class="annottext">x3 :: Word#
</span><a href="#local-6989586621679032396"><span class="hs-identifier hs-var hs-var">x3</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032397"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0x0F0F0F0F0F0F0F0F##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">4#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032397"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xF0F0F0F0F0F0F0F0##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">4#</span></span><span class="hs-special">)</span><span>
</span><span id="line-301"></span><span>      </span><span id="local-6989586621679032395"><span class="annot"><span class="annottext">x4 :: Word#
</span><a href="#local-6989586621679032395"><span class="hs-identifier hs-var hs-var">x4</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032396"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0x00FF00FF00FF00FF##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">8#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032396"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xFF00FF00FF00FF00##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">8#</span></span><span class="hs-special">)</span><span>
</span><span id="line-302"></span><span>      </span><span id="local-6989586621679032394"><span class="annot"><span class="annottext">x5 :: Word#
</span><a href="#local-6989586621679032394"><span class="hs-identifier hs-var hs-var">x5</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032395"><span class="hs-identifier hs-var">x4</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0x0000FFFF0000FFFF##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">16#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032395"><span class="hs-identifier hs-var">x4</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xFFFF0000FFFF0000##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">16#</span></span><span class="hs-special">)</span><span>
</span><span id="line-303"></span><span>      </span><span id="local-6989586621679032399"><span class="annot"><span class="annottext">r :: Word#
</span><a href="#local-6989586621679032399"><span class="hs-identifier hs-var hs-var">r</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032394"><span class="hs-identifier hs-var">x5</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0x00000000FFFFFFFF##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">32#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032394"><span class="hs-identifier hs-var">x5</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xFFFFFFFF00000000##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">32#</span></span><span class="hs-special">)</span><span class="hs-cpp">
#else
</span><span>      </span><span class="hs-identifier">x1</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">x0</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">and#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0x55555555##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">uncheckedShiftL#</span><span class="hs-special">`</span><span>  </span><span class="hs-number">1#</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">or#</span><span class="hs-special">`</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">x0</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">and#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0xAAAAAAAA##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">uncheckedShiftRL#</span><span class="hs-special">`</span><span>  </span><span class="hs-number">1#</span><span class="hs-special">)</span><span>
</span><span id="line-306"></span><span>      </span><span class="hs-identifier">x2</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">x1</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">and#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0x33333333##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">uncheckedShiftL#</span><span class="hs-special">`</span><span>  </span><span class="hs-number">2#</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">or#</span><span class="hs-special">`</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">x1</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">and#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0xCCCCCCCC##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">uncheckedShiftRL#</span><span class="hs-special">`</span><span>  </span><span class="hs-number">2#</span><span class="hs-special">)</span><span>
</span><span id="line-307"></span><span>      </span><span class="hs-identifier">x3</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">x2</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">and#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0x0F0F0F0F##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">uncheckedShiftL#</span><span class="hs-special">`</span><span>  </span><span class="hs-number">4#</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">or#</span><span class="hs-special">`</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">x2</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">and#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0xF0F0F0F0##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">uncheckedShiftRL#</span><span class="hs-special">`</span><span>  </span><span class="hs-number">4#</span><span class="hs-special">)</span><span>
</span><span id="line-308"></span><span>      </span><span class="hs-identifier">x4</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">x3</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">and#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0x00FF00FF##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">uncheckedShiftL#</span><span class="hs-special">`</span><span>  </span><span class="hs-number">8#</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">or#</span><span class="hs-special">`</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">x3</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">and#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0xFF00FF00##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">uncheckedShiftRL#</span><span class="hs-special">`</span><span>  </span><span class="hs-number">8#</span><span class="hs-special">)</span><span>
</span><span id="line-309"></span><span>      </span><span class="hs-identifier">r</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">x4</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">and#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0x0000FFFF##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">uncheckedShiftL#</span><span class="hs-special">`</span><span> </span><span class="hs-number">16#</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">or#</span><span class="hs-special">`</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">x4</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">and#</span><span class="hs-special">`</span><span> </span><span class="hs-number">0xFFFF0000##</span><span class="hs-special">)</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">uncheckedShiftRL#</span><span class="hs-special">`</span><span> </span><span class="hs-number">16#</span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-312"></span><span class="hs-comment">-- | Reverse bits in the Word32 subwords composing a Word#</span><span>
</span><span id="line-313"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordReverseBits32%23"><span class="hs-identifier hs-type">wordReverseBits32#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span class="hs-cpp">
#if WORD_SIZE_IN_BITS == 64
</span><span id="wordReverseBits32%23"><span class="annot"><span class="annottext">wordReverseBits32# :: Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordReverseBits32%23"><span class="hs-identifier hs-var hs-var">wordReverseBits32#</span></a></span></span><span> </span><span id="local-6989586621679032393"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032393"><span class="hs-identifier hs-var">x0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032392"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-316"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-317"></span><span>      </span><span id="local-6989586621679032391"><span class="annot"><span class="annottext">x1 :: Word#
</span><a href="#local-6989586621679032391"><span class="hs-identifier hs-var hs-var">x1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032393"><span class="hs-identifier hs-var">x0</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0x5555555555555555##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032393"><span class="hs-identifier hs-var">x0</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xAAAAAAAAAAAAAAAA##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-318"></span><span>      </span><span id="local-6989586621679032390"><span class="annot"><span class="annottext">x2 :: Word#
</span><a href="#local-6989586621679032390"><span class="hs-identifier hs-var hs-var">x2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032391"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0x3333333333333333##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">2#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032391"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xCCCCCCCCCCCCCCCC##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">2#</span></span><span class="hs-special">)</span><span>
</span><span id="line-319"></span><span>      </span><span id="local-6989586621679032389"><span class="annot"><span class="annottext">x3 :: Word#
</span><a href="#local-6989586621679032389"><span class="hs-identifier hs-var hs-var">x3</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032390"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0x0F0F0F0F0F0F0F0F##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">4#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032390"><span class="hs-identifier hs-var">x2</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xF0F0F0F0F0F0F0F0##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">4#</span></span><span class="hs-special">)</span><span>
</span><span id="line-320"></span><span>      </span><span id="local-6989586621679032388"><span class="annot"><span class="annottext">x4 :: Word#
</span><a href="#local-6989586621679032388"><span class="hs-identifier hs-var hs-var">x4</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032389"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0x00FF00FF00FF00FF##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">8#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032389"><span class="hs-identifier hs-var">x3</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xFF00FF00FF00FF00##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span>  </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">8#</span></span><span class="hs-special">)</span><span>
</span><span id="line-321"></span><span>      </span><span id="local-6989586621679032392"><span class="annot"><span class="annottext">r :: Word#
</span><a href="#local-6989586621679032392"><span class="hs-identifier hs-var hs-var">r</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032388"><span class="hs-identifier hs-var">x4</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0x0000FFFF0000FFFF##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">16#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032388"><span class="hs-identifier hs-var">x4</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xFFFF0000FFFF0000##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">16#</span></span><span class="hs-special">)</span><span class="hs-cpp">
#else
</span><span class="hs-identifier">wordReverseBits32#</span><span> </span><span class="hs-identifier">x0</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">wordReverseBits#</span><span> </span><span class="hs-identifier">x0</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-326"></span><span>
</span><span id="line-327"></span><span class="hs-comment">-- | Write a Word to @/addr/@ in base-256 little-endian representation and</span><span>
</span><span id="line-328"></span><span class="hs-comment">-- return the number of bytes written.</span><span>
</span><span id="line-329"></span><span id="local-6989586621679032550"><span class="annot"><a href="GHC.Num.Primitives.html#wordToAddrLE%23"><span class="hs-identifier hs-type">wordToAddrLE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032550"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032550"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-330"></span><span id="wordToAddrLE%23"><span class="annot"><span class="annottext">wordToAddrLE# :: forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordToAddrLE%23"><span class="hs-identifier hs-var hs-var">wordToAddrLE#</span></a></span></span><span> </span><span id="local-6989586621679032387"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032387"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679032386"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032386"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
forall {d}. Word# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="#local-6989586621679032385"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032387"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-331"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-332"></span><span>      </span><span id="local-6989586621679032385"><span class="annot"><span class="annottext">go :: Word# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="#local-6989586621679032385"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679032384"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032384"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679032383"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032383"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679032382"><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032382"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-333"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032384"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-334"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032382"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032383"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-335"></span><span>
</span><span id="line-336"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-337"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Bool# -&gt; Word# -&gt; State# d -&gt; State# d
forall d. Addr# -&gt; Bool# -&gt; Word# -&gt; State# d -&gt; State# d
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeWord8OffAddr%23"><span class="hs-identifier hs-var">writeWord8OffAddr#</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032386"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032383"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032384"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xFF##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032382"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-338"></span><span>            </span><span id="local-6989586621679032381"><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032381"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="#local-6989586621679032385"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032384"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">8#</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032383"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032381"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-339"></span><span>
</span><span id="line-340"></span><span class="hs-comment">-- | Write a Word to @/addr/@ in base-256 big-endian representation and</span><span>
</span><span id="line-341"></span><span class="hs-comment">-- return the number of bytes written.</span><span>
</span><span id="line-342"></span><span id="local-6989586621679032380"><span class="annot"><a href="GHC.Num.Primitives.html#wordToAddrBE%23"><span class="hs-identifier hs-type">wordToAddrBE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032380"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032380"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-343"></span><span id="wordToAddrBE%23"><span class="annot"><span class="annottext">wordToAddrBE# :: forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordToAddrBE%23"><span class="hs-identifier hs-var hs-var">wordToAddrBE#</span></a></span></span><span> </span><span id="local-6989586621679032379"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032379"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679032378"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032378"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
forall {d}. Bool# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="#local-6989586621679032377"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-special">(</span><span class="hs-identifier">WORD_SIZE_IN_BITS#</span><span> </span><span class="hs-operator">-#</span><span> </span><span class="hs-identifier">clz</span><span class="hs-special">)</span><span>
</span><span id="line-344"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-345"></span><span>     </span><span class="hs-glyph">!</span><span id="local-6989586621679032376"><span class="annot"><span class="annottext">clz :: Bool#
</span><a href="#local-6989586621679032376"><span class="hs-identifier hs-var hs-var">clz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#clz%23"><span class="hs-identifier hs-var">clz#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032379"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#not%23"><span class="hs-identifier hs-var">not#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0b0111##</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- keep complete bytes</span><span>
</span><span id="line-346"></span><span>
</span><span id="line-347"></span><span>     </span><span id="local-6989586621679032377"><span class="annot"><span class="annottext">go :: Bool# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="#local-6989586621679032377"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679032375"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032375"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679032374"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032374"><span class="hs-identifier hs-var">sh</span></a></span></span><span> </span><span id="local-6989586621679032373"><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032373"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-348"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032374"><span class="hs-identifier hs-var">sh</span></a></span><span>
</span><span id="line-349"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032373"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032375"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-350"></span><span>
</span><span id="line-351"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-352"></span><span>      </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032372"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032372"><span class="hs-identifier hs-var">w'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032379"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032374"><span class="hs-identifier hs-var">sh</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">8#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xFF##</span></span><span>
</span><span id="line-353"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Bool# -&gt; Word# -&gt; State# d -&gt; State# d
forall d. Addr# -&gt; Bool# -&gt; Word# -&gt; State# d -&gt; State# d
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeWord8OffAddr%23"><span class="hs-identifier hs-var">writeWord8OffAddr#</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032378"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032375"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032372"><span class="hs-identifier hs-var">w'</span></a></span><span> </span><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032373"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-354"></span><span>         </span><span id="local-6989586621679032371"><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032371"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="#local-6989586621679032377"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032375"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032374"><span class="hs-identifier hs-var">sh</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">8#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032371"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-355"></span><span>
</span><span id="line-356"></span><span class="hs-comment">-- | Write a Word to @/addr/@ in base-256 representation and</span><span>
</span><span id="line-357"></span><span class="hs-comment">-- return the number of bytes written.</span><span>
</span><span id="line-358"></span><span class="hs-comment">--</span><span>
</span><span id="line-359"></span><span class="hs-comment">-- The endianness is selected with the Bool# parameter: write most significant</span><span>
</span><span id="line-360"></span><span class="hs-comment">-- byte first (big-endian) if @1#@ or least significant byte first</span><span>
</span><span id="line-361"></span><span class="hs-comment">-- (little-endian) if @0#@.</span><span>
</span><span id="line-362"></span><span id="local-6989586621679032544"><span class="annot"><a href="GHC.Num.Primitives.html#wordToAddr%23"><span class="hs-identifier hs-type">wordToAddr#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032544"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032544"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-363"></span><span id="wordToAddr%23"><span class="annot"><span class="annottext">wordToAddr# :: forall s.
Word# -&gt; Addr# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordToAddr%23"><span class="hs-identifier hs-var hs-var">wordToAddr#</span></a></span></span><span> </span><span id="local-6989586621679032370"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032370"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679032369"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032369"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span id="local-6989586621679032368"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032368"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordToAddrLE%23"><span class="hs-identifier hs-var">wordToAddrLE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032370"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032369"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032368"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-364"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordToAddr%23"><span class="hs-identifier hs-var">wordToAddr#</span></a></span><span> </span><span id="local-6989586621679032367"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032367"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679032366"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032366"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679032365"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032365"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordToAddrBE%23"><span class="hs-identifier hs-var">wordToAddrBE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032367"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032366"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032365"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-365"></span><span>
</span><span id="line-366"></span><span>
</span><span id="line-367"></span><span class="hs-comment">-- | Read a Word from @/addr/@ in base-256 little-endian representation.</span><span>
</span><span id="line-368"></span><span class="hs-comment">--</span><span>
</span><span id="line-369"></span><span class="hs-comment">-- @'n' is the number of bytes to read.</span><span>
</span><span id="line-370"></span><span id="local-6989586621679032364"><span class="annot"><a href="GHC.Num.Primitives.html#wordFromAddrLE%23"><span class="hs-identifier hs-type">wordFromAddrLE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032364"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032364"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-371"></span><span id="wordFromAddrLE%23"><span class="annot"><span class="annottext">wordFromAddrLE# :: forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordFromAddrLE%23"><span class="hs-identifier hs-var hs-var">wordFromAddrLE#</span></a></span></span><span> </span><span id="local-6989586621679032363"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032363"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679032362"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032362"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621679032361"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032361"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-372"></span><span>   </span><span class="hs-comment">-- Optimize when we read a full word</span><span>
</span><span id="line-373"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BYTES##</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier">n</span><span>
</span><span id="line-374"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
forall d. Addr# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#readWordOffAddr%23"><span class="hs-identifier hs-var">readWordOffAddr#</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032362"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032361"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span class="hs-cpp">
#if defined(WORDS_BIGENDIAN)
</span><span>      </span><span class="hs-special">(#</span><span> </span><span class="hs-identifier">s'</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">w</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-identifier">s'</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">wordReverseBytes#</span><span> </span><span class="hs-identifier">w</span><span> </span><span class="hs-special">#)</span><span class="hs-cpp">
#else
</span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032360"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032360"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032359"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032359"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032360"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032359"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-special">#)</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-381"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromAddrLE%23"><span class="hs-identifier hs-var">wordFromAddrLE#</span></a></span><span> </span><span id="local-6989586621679032358"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032358"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679032357"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032357"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621679032356"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032356"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
forall {d}. Word# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="#local-6989586621679032355"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032356"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-382"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-383"></span><span>      </span><span id="local-6989586621679032355"><span class="annot"><span class="annottext">go :: Word# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="#local-6989586621679032355"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679032354"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032354"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679032353"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032353"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679032352"><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032352"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-384"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032353"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032358"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-385"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032352"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032354"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-386"></span><span>
</span><span id="line-387"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-388"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
forall d. Addr# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#readWord8OffAddr%23"><span class="hs-identifier hs-var">readWord8OffAddr#</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032357"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032353"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032352"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-389"></span><span>            </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032351"><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032351"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032350"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032350"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="#local-6989586621679032355"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032354"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032350"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032353"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftL%23"><span class="hs-operator hs-var">`uncheckedIShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">3#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-390"></span><span>                              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032353"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-391"></span><span>                              </span><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032351"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-392"></span><span>
</span><span id="line-393"></span><span class="hs-comment">-- | Read a Word from @/addr/@ in base-256 big-endian representation.</span><span>
</span><span id="line-394"></span><span class="hs-comment">--</span><span>
</span><span id="line-395"></span><span class="hs-comment">-- @'n' is the number of bytes to read.</span><span>
</span><span id="line-396"></span><span id="local-6989586621679032349"><span class="annot"><a href="GHC.Num.Primitives.html#wordFromAddrBE%23"><span class="hs-identifier hs-type">wordFromAddrBE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032349"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032349"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-397"></span><span id="wordFromAddrBE%23"><span class="annot"><span class="annottext">wordFromAddrBE# :: forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordFromAddrBE%23"><span class="hs-identifier hs-var hs-var">wordFromAddrBE#</span></a></span></span><span> </span><span id="local-6989586621679032348"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032348"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679032347"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032347"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621679032346"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032346"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-398"></span><span>   </span><span class="hs-comment">-- Optimize when we read a full word</span><span>
</span><span id="line-399"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BYTES##</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier">n</span><span>
</span><span id="line-400"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
forall d. Addr# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#readWordOffAddr%23"><span class="hs-identifier hs-var">readWordOffAddr#</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032347"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032346"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span class="hs-cpp">
#if defined(WORDS_BIGENDIAN)
</span><span>      </span><span class="hs-special">(#</span><span> </span><span class="hs-identifier">s'</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">w</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="hs-identifier">s'</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">w</span><span> </span><span class="hs-special">#)</span><span class="hs-cpp">
#else
</span><span>      </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032345"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032345"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032344"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032344"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032345"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordReverseBytes%23"><span class="hs-identifier hs-var">wordReverseBytes#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032344"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-special">#)</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-407"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromAddrBE%23"><span class="hs-identifier hs-var">wordFromAddrBE#</span></a></span><span> </span><span id="local-6989586621679032343"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032343"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679032342"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032342"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span id="local-6989586621679032341"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032341"><span class="hs-identifier hs-var">s0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
forall {d}. Word# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="#local-6989586621679032340"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032341"><span class="hs-identifier hs-var">s0</span></a></span><span>
</span><span id="line-408"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-409"></span><span>      </span><span id="local-6989586621679032340"><span class="annot"><span class="annottext">go :: Word# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="#local-6989586621679032340"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679032339"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032339"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679032338"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032338"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679032337"><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032337"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-410"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032338"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032343"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-411"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032337"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032339"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-412"></span><span>
</span><span id="line-413"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-414"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
forall d. Addr# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="../../ghc-prim/src/GHC.Prim.html#readWord8OffAddr%23"><span class="hs-identifier hs-var">readWord8OffAddr#</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032342"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032338"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032337"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-415"></span><span>            </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032336"><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032336"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032335"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032335"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; State# d -&gt; (# State# d, Word# #)
</span><a href="#local-6989586621679032340"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032339"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">8#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032335"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-416"></span><span>                              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032338"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-417"></span><span>                              </span><span class="annot"><span class="annottext">State# d
</span><a href="#local-6989586621679032336"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-418"></span><span>
</span><span id="line-419"></span><span class="hs-comment">-- | Read a Word from @/addr/@ in base-256 representation.</span><span>
</span><span id="line-420"></span><span class="hs-comment">--</span><span>
</span><span id="line-421"></span><span class="hs-comment">-- @'n' is the number of bytes to read.</span><span>
</span><span id="line-422"></span><span class="hs-comment">--</span><span>
</span><span id="line-423"></span><span class="hs-comment">-- The endianness is selected with the Bool# parameter: write most significant</span><span>
</span><span id="line-424"></span><span class="hs-comment">-- byte first (big-endian) if @1#@ or least significant byte first</span><span>
</span><span id="line-425"></span><span class="hs-comment">-- (little-endian) if @0#@.</span><span>
</span><span id="line-426"></span><span id="local-6989586621679032334"><span class="annot"><a href="GHC.Num.Primitives.html#wordFromAddr%23"><span class="hs-identifier hs-type">wordFromAddr#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032334"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032334"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-427"></span><span id="wordFromAddr%23"><span class="annot"><span class="annottext">wordFromAddr# :: forall s.
Word# -&gt; Addr# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordFromAddr%23"><span class="hs-identifier hs-var hs-var">wordFromAddr#</span></a></span></span><span> </span><span id="local-6989586621679032333"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032333"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679032332"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032332"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span id="local-6989586621679032331"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032331"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordFromAddrLE%23"><span class="hs-identifier hs-var">wordFromAddrLE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032333"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032332"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032331"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-428"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromAddr%23"><span class="hs-identifier hs-var">wordFromAddr#</span></a></span><span> </span><span id="local-6989586621679032330"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032330"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679032329"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032329"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679032328"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032328"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
forall s. Word# -&gt; Addr# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordFromAddrBE%23"><span class="hs-identifier hs-var">wordFromAddrBE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032330"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032329"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032328"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-429"></span><span>
</span><span id="line-430"></span><span>
</span><span id="line-431"></span><span>
</span><span id="line-432"></span><span class="hs-comment">-- | Write a full word with little-endian encoding</span><span>
</span><span id="line-433"></span><span id="local-6989586621679032537"><span class="annot"><a href="GHC.Num.Primitives.html#wordWriteAddrLE%23"><span class="hs-identifier hs-type">wordWriteAddrLE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032537"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032537"><span class="hs-identifier hs-type">s</span></a></span></span><span>
</span><span id="line-434"></span><span id="wordWriteAddrLE%23"><span class="annot"><span class="annottext">wordWriteAddrLE# :: forall s. Word# -&gt; Addr# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Primitives.html#wordWriteAddrLE%23"><span class="hs-identifier hs-var hs-var">wordWriteAddrLE#</span></a></span></span><span> </span><span id="local-6989586621679032327"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032327"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679032326"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032326"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall d. Addr# -&gt; Bool# -&gt; Word# -&gt; State# d -&gt; State# d
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeWordOffAddr%23"><span class="hs-identifier hs-var">writeWordOffAddr#</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032326"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-cpp">
#if defined(WORDS_BIGENDIAN)
</span><span>   </span><span class="hs-special">(</span><span class="hs-identifier">wordReverseBytes#</span><span> </span><span class="hs-identifier">w</span><span class="hs-special">)</span><span class="hs-cpp">
#else
</span><span>   </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032327"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-441"></span><span class="hs-comment">-- | Write a full word with little-endian encoding</span><span>
</span><span id="line-442"></span><span id="local-6989586621679032325"><span class="annot"><a href="GHC.Num.Primitives.html#wordWriteAddrBE%23"><span class="hs-identifier hs-type">wordWriteAddrBE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Addr%23"><span class="hs-identifier hs-type">Addr#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032325"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032325"><span class="hs-identifier hs-type">s</span></a></span></span><span>
</span><span id="line-443"></span><span id="wordWriteAddrBE%23"><span class="annot"><span class="annottext">wordWriteAddrBE# :: forall s. Word# -&gt; Addr# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Primitives.html#wordWriteAddrBE%23"><span class="hs-identifier hs-var hs-var">wordWriteAddrBE#</span></a></span></span><span> </span><span id="local-6989586621679032324"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032324"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679032323"><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032323"><span class="hs-identifier hs-var">addr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Addr# -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall d. Addr# -&gt; Bool# -&gt; Word# -&gt; State# d -&gt; State# d
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeWordOffAddr%23"><span class="hs-identifier hs-var">writeWordOffAddr#</span></a></span><span> </span><span class="annot"><span class="annottext">Addr#
</span><a href="#local-6989586621679032323"><span class="hs-identifier hs-var">addr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span class="hs-cpp">
#if defined(WORDS_BIGENDIAN)
</span><span>   </span><span class="hs-identifier">w</span><span class="hs-cpp">
#else
</span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordReverseBytes%23"><span class="hs-identifier hs-var">wordReverseBytes#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032324"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-450"></span><span class="hs-comment">-- | Write a Word to @/MutableByteArray/@ in base-256 little-endian</span><span>
</span><span id="line-451"></span><span class="hs-comment">-- representation and return the number of bytes written.</span><span>
</span><span id="line-452"></span><span class="hs-comment">--</span><span>
</span><span id="line-453"></span><span class="hs-comment">-- The offset is in bytes.</span><span>
</span><span id="line-454"></span><span id="local-6989586621679032534"><span class="annot"><a href="GHC.Num.Primitives.html#wordToMutableByteArrayLE%23"><span class="hs-identifier hs-type">wordToMutableByteArrayLE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032534"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032534"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032534"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-455"></span><span id="wordToMutableByteArrayLE%23"><span class="annot"><span class="annottext">wordToMutableByteArrayLE# :: forall s.
Word#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordToMutableByteArrayLE%23"><span class="hs-identifier hs-var hs-var">wordToMutableByteArrayLE#</span></a></span></span><span> </span><span id="local-6989586621679032322"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032322"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679032321"><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679032321"><span class="hs-identifier hs-var">mba</span></a></span></span><span> </span><span id="local-6989586621679032320"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032320"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679032319"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032322"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-456"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-457"></span><span>      </span><span id="local-6989586621679032319"><span class="annot"><span class="annottext">go :: Word# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679032319"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679032318"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032318"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679032317"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032317"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679032316"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032316"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-458"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032318"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-459"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032316"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032317"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-460"></span><span>
</span><span id="line-461"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-462"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall d.
MutableByteArray# d -&gt; Bool# -&gt; Word# -&gt; State# d -&gt; State# d
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeWord8Array%23"><span class="hs-identifier hs-var">writeWord8Array#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679032321"><span class="hs-identifier hs-var">mba</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032320"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032317"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032318"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xFF##</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032316"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-463"></span><span>            </span><span id="local-6989586621679032315"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032315"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679032319"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032318"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">8#</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032317"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032315"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-464"></span><span>
</span><span id="line-465"></span><span class="hs-comment">-- | Write a Word to @/MutableByteArray/@ in base-256 big-endian representation and</span><span>
</span><span id="line-466"></span><span class="hs-comment">-- return the number of bytes written.</span><span>
</span><span id="line-467"></span><span class="hs-comment">--</span><span>
</span><span id="line-468"></span><span class="hs-comment">-- The offset is in bytes.</span><span>
</span><span id="line-469"></span><span id="local-6989586621679032314"><span class="annot"><a href="GHC.Num.Primitives.html#wordToMutableByteArrayBE%23"><span class="hs-identifier hs-type">wordToMutableByteArrayBE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032314"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032314"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032314"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-470"></span><span id="wordToMutableByteArrayBE%23"><span class="annot"><span class="annottext">wordToMutableByteArrayBE# :: forall s.
Word#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordToMutableByteArrayBE%23"><span class="hs-identifier hs-var hs-var">wordToMutableByteArrayBE#</span></a></span></span><span> </span><span id="local-6989586621679032313"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032313"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679032312"><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679032312"><span class="hs-identifier hs-var">mba</span></a></span></span><span> </span><span id="local-6989586621679032311"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032311"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679032310"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-special">(</span><span class="hs-identifier">WORD_SIZE_IN_BITS#</span><span> </span><span class="hs-operator">-#</span><span> </span><span class="hs-identifier">clz</span><span class="hs-special">)</span><span>
</span><span id="line-471"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-472"></span><span>     </span><span class="hs-glyph">!</span><span id="local-6989586621679032309"><span class="annot"><span class="annottext">clz :: Bool#
</span><a href="#local-6989586621679032309"><span class="hs-identifier hs-var hs-var">clz</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#clz%23"><span class="hs-identifier hs-var">clz#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032313"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#not%23"><span class="hs-identifier hs-var">not#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0b0111##</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- keep complete bytes</span><span>
</span><span id="line-473"></span><span>
</span><span id="line-474"></span><span>     </span><span id="local-6989586621679032310"><span class="annot"><span class="annottext">go :: Bool# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679032310"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679032308"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032308"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679032307"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032307"><span class="hs-identifier hs-var">sh</span></a></span></span><span> </span><span id="local-6989586621679032306"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032306"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-475"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032307"><span class="hs-identifier hs-var">sh</span></a></span><span>
</span><span id="line-476"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032306"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#int2Word%23"><span class="hs-identifier hs-var">int2Word#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032308"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-477"></span><span>
</span><span id="line-478"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-479"></span><span>      </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679032305"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032305"><span class="hs-identifier hs-var">w'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032313"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftRL%23"><span class="hs-operator hs-var">`uncheckedShiftRL#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032307"><span class="hs-identifier hs-var">sh</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">8#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#and%23"><span class="hs-operator hs-var">`and#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0xFF##</span></span><span>
</span><span id="line-480"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall d.
MutableByteArray# d -&gt; Bool# -&gt; Word# -&gt; State# d -&gt; State# d
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeWord8Array%23"><span class="hs-identifier hs-var">writeWord8Array#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679032312"><span class="hs-identifier hs-var">mba</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032311"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032308"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032305"><span class="hs-identifier hs-var">w'</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032306"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-481"></span><span>         </span><span id="local-6989586621679032304"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032304"><span class="hs-identifier hs-var">s'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; State# s -&gt; (# State# s, Word# #)
</span><a href="#local-6989586621679032310"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032308"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032307"><span class="hs-identifier hs-var">sh</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#-%23"><span class="hs-operator hs-var">-#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">8#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032304"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-482"></span><span>
</span><span id="line-483"></span><span class="hs-comment">-- | Write a Word to @/MutableByteArray/@ in base-256 representation and</span><span>
</span><span id="line-484"></span><span class="hs-comment">-- return the number of bytes written.</span><span>
</span><span id="line-485"></span><span class="hs-comment">--</span><span>
</span><span id="line-486"></span><span class="hs-comment">-- The endianness is selected with the Bool# parameter: write most significant</span><span>
</span><span id="line-487"></span><span class="hs-comment">-- byte first (big-endian) if @1#@ or least significant byte first</span><span>
</span><span id="line-488"></span><span class="hs-comment">-- (little-endian) if @0#@.</span><span>
</span><span id="line-489"></span><span class="hs-comment">--</span><span>
</span><span id="line-490"></span><span class="hs-comment">-- The offset is in bytes.</span><span>
</span><span id="line-491"></span><span id="local-6989586621679032531"><span class="annot"><a href="GHC.Num.Primitives.html#wordToMutableByteArray%23"><span class="hs-identifier hs-type">wordToMutableByteArray#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032531"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032531"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032531"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span></span><span>
</span><span id="line-492"></span><span id="wordToMutableByteArray%23"><span class="annot"><span class="annottext">wordToMutableByteArray# :: forall s.
Word#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; Bool#
-&gt; State# s
-&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordToMutableByteArray%23"><span class="hs-identifier hs-var hs-var">wordToMutableByteArray#</span></a></span></span><span> </span><span id="local-6989586621679032303"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032303"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679032302"><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679032302"><span class="hs-identifier hs-var">mba</span></a></span></span><span> </span><span id="local-6989586621679032301"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032301"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span id="local-6989586621679032300"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032300"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
forall s.
Word#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordToMutableByteArrayLE%23"><span class="hs-identifier hs-var">wordToMutableByteArrayLE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032303"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679032302"><span class="hs-identifier hs-var">mba</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032301"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032300"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-493"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordToMutableByteArray%23"><span class="hs-identifier hs-var">wordToMutableByteArray#</span></a></span><span> </span><span id="local-6989586621679032299"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032299"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679032298"><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679032298"><span class="hs-identifier hs-var">mba</span></a></span></span><span> </span><span id="local-6989586621679032297"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032297"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679032296"><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032296"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
forall s.
Word#
-&gt; MutableByteArray# s
-&gt; Word#
-&gt; State# s
-&gt; (# State# s, Word# #)
</span><a href="GHC.Num.Primitives.html#wordToMutableByteArrayBE%23"><span class="hs-identifier hs-var">wordToMutableByteArrayBE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032299"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679032298"><span class="hs-identifier hs-var">mba</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032297"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">State# s
</span><a href="#local-6989586621679032296"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-494"></span><span>
</span><span id="line-495"></span><span class="hs-comment">-- | Write a full word with little-endian encoding</span><span>
</span><span id="line-496"></span><span id="local-6989586621679032529"><span class="annot"><a href="GHC.Num.Primitives.html#wordWriteMutableByteArrayLE%23"><span class="hs-identifier hs-type">wordWriteMutableByteArrayLE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032529"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032529"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032529"><span class="hs-identifier hs-type">s</span></a></span></span><span>
</span><span id="line-497"></span><span id="wordWriteMutableByteArrayLE%23"><span class="annot"><span class="annottext">wordWriteMutableByteArrayLE# :: forall s.
Word# -&gt; MutableByteArray# s -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Primitives.html#wordWriteMutableByteArrayLE%23"><span class="hs-identifier hs-var hs-var">wordWriteMutableByteArrayLE#</span></a></span></span><span> </span><span id="local-6989586621679032295"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032295"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679032294"><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679032294"><span class="hs-identifier hs-var">mba</span></a></span></span><span> </span><span id="local-6989586621679032293"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032293"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall d.
MutableByteArray# d -&gt; Bool# -&gt; Word# -&gt; State# d -&gt; State# d
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeWord8ArrayAsWord%23"><span class="hs-identifier hs-var">writeWord8ArrayAsWord#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679032294"><span class="hs-identifier hs-var">mba</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032293"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span class="hs-cpp">
#if defined(WORDS_BIGENDIAN)
</span><span>   </span><span class="hs-special">(</span><span class="hs-identifier">wordReverseBytes#</span><span> </span><span class="hs-identifier">w</span><span class="hs-special">)</span><span class="hs-cpp">
#else
</span><span>   </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032295"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-504"></span><span class="hs-comment">-- | Write a full word with little-endian encoding</span><span>
</span><span id="line-505"></span><span id="local-6989586621679032292"><span class="annot"><a href="GHC.Num.Primitives.html#wordWriteMutableByteArrayBE%23"><span class="hs-identifier hs-type">wordWriteMutableByteArrayBE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#MutableByteArray%23"><span class="hs-identifier hs-type">MutableByteArray#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032292"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032292"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032292"><span class="hs-identifier hs-type">s</span></a></span></span><span>
</span><span id="line-506"></span><span id="wordWriteMutableByteArrayBE%23"><span class="annot"><span class="annottext">wordWriteMutableByteArrayBE# :: forall s.
Word# -&gt; MutableByteArray# s -&gt; Word# -&gt; State# s -&gt; State# s
</span><a href="GHC.Num.Primitives.html#wordWriteMutableByteArrayBE%23"><span class="hs-identifier hs-var hs-var">wordWriteMutableByteArrayBE#</span></a></span></span><span> </span><span id="local-6989586621679032291"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032291"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679032290"><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679032290"><span class="hs-identifier hs-var">mba</span></a></span></span><span> </span><span id="local-6989586621679032289"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032289"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s -&gt; Bool# -&gt; Word# -&gt; State# s -&gt; State# s
forall d.
MutableByteArray# d -&gt; Bool# -&gt; Word# -&gt; State# d -&gt; State# d
</span><a href="../../ghc-prim/src/GHC.Prim.html#writeWord8ArrayAsWord%23"><span class="hs-identifier hs-var">writeWord8ArrayAsWord#</span></a></span><span> </span><span class="annot"><span class="annottext">MutableByteArray# s
</span><a href="#local-6989586621679032290"><span class="hs-identifier hs-var">mba</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032289"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span class="hs-cpp">
#if defined(WORDS_BIGENDIAN)
</span><span>   </span><span class="hs-identifier">w</span><span class="hs-cpp">
#else
</span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordReverseBytes%23"><span class="hs-identifier hs-var">wordReverseBytes#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032291"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">)</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-513"></span><span class="hs-comment">-- | Read a Word from @/ByteArray/@ in base-256 little-endian representation.</span><span>
</span><span id="line-514"></span><span class="hs-comment">--</span><span>
</span><span id="line-515"></span><span class="hs-comment">-- @'n' is the number of bytes to read.</span><span>
</span><span id="line-516"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromByteArrayLE%23"><span class="hs-identifier hs-type">wordFromByteArrayLE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-517"></span><span id="wordFromByteArrayLE%23"><span class="annot"><span class="annottext">wordFromByteArrayLE# :: Word# -&gt; ByteArray# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordFromByteArrayLE%23"><span class="hs-identifier hs-var hs-var">wordFromByteArrayLE#</span></a></span></span><span> </span><span id="local-6989586621679032288"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032288"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679032287"><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679032287"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span id="local-6989586621679032286"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032286"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-518"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032288"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-519"></span><span>      </span><span class="hs-comment">-- Optimize when we read a full word</span><span>
</span><span id="line-520"></span><span>      </span><span class="hs-identifier">WORD_SIZE_IN_BYTES##</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-identifier">indexWord8ArrayAsWord#</span><span> </span><span class="hs-identifier">ba</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">word2Int#</span><span> </span><span class="hs-identifier">off</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span class="hs-cpp">
#if defined(WORDS_BIGENDIAN)
</span><span>         </span><span class="hs-identifier">w</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">wordReverseBytes#</span><span> </span><span class="hs-identifier">w</span><span class="hs-cpp">
#else
</span><span>         </span><span class="hs-identifier">w</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">w</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-527"></span><span>      </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-528"></span><span>            </span><span id="local-6989586621679032284"><span class="annot"><span class="annottext">go :: Word# -&gt; Bool# -&gt; Word#
</span><a href="#local-6989586621679032284"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679032283"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032283"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679032282"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032282"><span class="hs-identifier hs-var">c</span></a></span></span><span>
</span><span id="line-529"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032282"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032288"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-530"></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032283"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-531"></span><span>
</span><span id="line-532"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-533"></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ByteArray# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWord8Array%23"><span class="hs-identifier hs-var">indexWord8Array#</span></a></span><span> </span><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679032287"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032286"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032282"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-534"></span><span>                  </span><span id="local-6989586621679032281"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032281"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="#local-6989586621679032284"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032283"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032281"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032282"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedIShiftL%23"><span class="hs-operator hs-var">`uncheckedIShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">3#</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-535"></span><span>                          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032282"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-536"></span><span>           </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="#local-6989586621679032284"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-537"></span><span>
</span><span id="line-538"></span><span class="hs-comment">-- | Read a Word from @/ByteArray/@ in base-256 big-endian representation.</span><span>
</span><span id="line-539"></span><span class="hs-comment">--</span><span>
</span><span id="line-540"></span><span class="hs-comment">-- @'n' is the number of bytes to read.</span><span>
</span><span id="line-541"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromByteArrayBE%23"><span class="hs-identifier hs-type">wordFromByteArrayBE#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-542"></span><span id="wordFromByteArrayBE%23"><span class="annot"><span class="annottext">wordFromByteArrayBE# :: Word# -&gt; ByteArray# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordFromByteArrayBE%23"><span class="hs-identifier hs-var hs-var">wordFromByteArrayBE#</span></a></span></span><span> </span><span id="local-6989586621679032280"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032280"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679032279"><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679032279"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span id="local-6989586621679032278"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032278"><span class="hs-identifier hs-var">off</span></a></span></span><span>
</span><span id="line-543"></span><span>   </span><span class="hs-comment">-- Optimize when we read a full word</span><span>
</span><span id="line-544"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="hs-identifier">WORD_SIZE_IN_BYTES##</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-identifier">n</span><span>
</span><span id="line-545"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ByteArray# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWord8ArrayAsWord%23"><span class="hs-identifier hs-var">indexWord8ArrayAsWord#</span></a></span><span> </span><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679032279"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032278"><span class="hs-identifier hs-var">off</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span class="hs-cpp">
#if defined(WORDS_BIGENDIAN)
</span><span>      </span><span class="hs-identifier">w</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">w</span><span class="hs-cpp">
#else
</span><span>      </span><span id="local-6989586621679032277"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032277"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordReverseBytes%23"><span class="hs-identifier hs-var">wordReverseBytes#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032277"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-552"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromByteArrayBE%23"><span class="hs-identifier hs-var">wordFromByteArrayBE#</span></a></span><span> </span><span id="local-6989586621679032276"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032276"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679032275"><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679032275"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span id="local-6989586621679032274"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032274"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="#local-6989586621679032273"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span>
</span><span id="line-553"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-554"></span><span>      </span><span id="local-6989586621679032273"><span class="annot"><span class="annottext">go :: Word# -&gt; Bool# -&gt; Word#
</span><a href="#local-6989586621679032273"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679032272"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032272"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621679032271"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032271"><span class="hs-identifier hs-var">c</span></a></span></span><span>
</span><span id="line-555"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#isTrue%23"><span class="hs-identifier hs-var">isTrue#</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032271"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%3D%3D%23"><span class="hs-operator hs-var">==#</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032276"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-556"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032272"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-557"></span><span>
</span><span id="line-558"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-559"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ByteArray# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#indexWord8Array%23"><span class="hs-identifier hs-var">indexWord8Array#</span></a></span><span> </span><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679032275"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#word2Int%23"><span class="hs-identifier hs-var">word2Int#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032274"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032271"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-560"></span><span>            </span><span id="local-6989586621679032270"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032270"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="#local-6989586621679032273"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032272"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Bool# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#uncheckedShiftL%23"><span class="hs-operator hs-var">`uncheckedShiftL#`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">8#</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; Word# -&gt; Word#
</span><a href="../../ghc-prim/src/GHC.Prim.html#or%23"><span class="hs-operator hs-var">`or#`</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032270"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032271"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool# -&gt; Bool# -&gt; Bool#
</span><a href="../../ghc-prim/src/GHC.Prim.html#%2B%23"><span class="hs-operator hs-var">+#</span></a></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span class="hs-special">)</span><span>
</span><span id="line-561"></span><span>
</span><span id="line-562"></span><span class="hs-comment">-- | Read a Word from @/ByteArray/@ in base-256 representation.</span><span>
</span><span id="line-563"></span><span class="hs-comment">--</span><span>
</span><span id="line-564"></span><span class="hs-comment">-- @'n' is the number of bytes to read.</span><span>
</span><span id="line-565"></span><span class="hs-comment">--</span><span>
</span><span id="line-566"></span><span class="hs-comment">-- The endianness is selected with the Bool# parameter: write most significant</span><span>
</span><span id="line-567"></span><span class="hs-comment">-- byte first (big-endian) if @1#@ or least significant byte first</span><span>
</span><span id="line-568"></span><span class="hs-comment">-- (little-endian) if @0#@.</span><span>
</span><span id="line-569"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromByteArray%23"><span class="hs-identifier hs-type">wordFromByteArray#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#ByteArray%23"><span class="hs-identifier hs-type">ByteArray#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-570"></span><span id="wordFromByteArray%23"><span class="annot"><span class="annottext">wordFromByteArray# :: Word# -&gt; ByteArray# -&gt; Word# -&gt; Bool# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordFromByteArray%23"><span class="hs-identifier hs-var hs-var">wordFromByteArray#</span></a></span></span><span> </span><span id="local-6989586621679032269"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032269"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679032268"><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679032268"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span id="local-6989586621679032267"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032267"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; ByteArray# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordFromByteArrayLE%23"><span class="hs-identifier hs-var">wordFromByteArrayLE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032269"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679032268"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032267"><span class="hs-identifier hs-var">off</span></a></span><span>
</span><span id="line-571"></span><span class="annot"><a href="GHC.Num.Primitives.html#wordFromByteArray%23"><span class="hs-identifier hs-var">wordFromByteArray#</span></a></span><span> </span><span id="local-6989586621679032266"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032266"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679032265"><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679032265"><span class="hs-identifier hs-var">ba</span></a></span></span><span> </span><span id="local-6989586621679032264"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032264"><span class="hs-identifier hs-var">off</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word# -&gt; ByteArray# -&gt; Word# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#wordFromByteArrayBE%23"><span class="hs-identifier hs-var">wordFromByteArrayBE#</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032266"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">ByteArray#
</span><a href="#local-6989586621679032265"><span class="hs-identifier hs-var">ba</span></a></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032264"><span class="hs-identifier hs-var">off</span></a></span><span>
</span><span id="line-572"></span><span>
</span><span id="line-573"></span><span class="hs-comment">----------------------------------</span><span>
</span><span id="line-574"></span><span class="hs-comment">-- IO</span><span>
</span><span id="line-575"></span><span class="hs-comment">----------------------------------</span><span>
</span><span id="line-576"></span><span>
</span><span id="line-577"></span><span id="local-6989586621679032526"><span class="annot"><a href="GHC.Num.Primitives.html#ioVoid"><span class="hs-identifier hs-type">ioVoid</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679032526"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span></span><span>
</span><span id="line-578"></span><span id="ioVoid"><span class="annot"><span class="annottext">ioVoid :: forall a. IO a -&gt; State# RealWorld -&gt; State# RealWorld
</span><a href="GHC.Num.Primitives.html#ioVoid"><span class="hs-identifier hs-var hs-var">ioVoid</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span id="local-6989586621679032263"><span class="annot"><span class="annottext">State# RealWorld -&gt; (# State# RealWorld, a #)
</span><a href="#local-6989586621679032263"><span class="hs-identifier hs-var">io</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679032262"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032262"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">State# RealWorld -&gt; (# State# RealWorld, a #)
</span><a href="#local-6989586621679032263"><span class="hs-identifier hs-var">io</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032262"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-579"></span><span>                  </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032261"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032261"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032261"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-580"></span><span>
</span><span id="line-581"></span><span class="annot"><a href="GHC.Num.Primitives.html#ioWord%23"><span class="hs-identifier hs-type">ioWord#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Word"><span class="hs-identifier hs-type">Word</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-582"></span><span id="ioWord%23"><span class="annot"><span class="annottext">ioWord# :: IO Word -&gt; State# RealWorld -&gt; (# State# RealWorld, Word# #)
</span><a href="GHC.Num.Primitives.html#ioWord%23"><span class="hs-identifier hs-var hs-var">ioWord#</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span id="local-6989586621679032260"><span class="annot"><span class="annottext">State# RealWorld -&gt; (# State# RealWorld, Word #)
</span><a href="#local-6989586621679032260"><span class="hs-identifier hs-var">io</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679032259"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032259"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">State# RealWorld -&gt; (# State# RealWorld, Word #)
</span><a href="#local-6989586621679032260"><span class="hs-identifier hs-var">io</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032259"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-583"></span><span>   </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032258"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032258"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#W%23"><span class="hs-identifier hs-type">W#</span></a></span><span> </span><span id="local-6989586621679032257"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032257"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032258"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621679032257"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-584"></span><span>
</span><span id="line-585"></span><span class="annot"><a href="GHC.Num.Primitives.html#ioInt%23"><span class="hs-identifier hs-type">ioInt#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-586"></span><span id="ioInt%23"><span class="annot"><span class="annottext">ioInt# :: IO Int -&gt; State# RealWorld -&gt; (# State# RealWorld, Bool# #)
</span><a href="GHC.Num.Primitives.html#ioInt%23"><span class="hs-identifier hs-var hs-var">ioInt#</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span id="local-6989586621679032256"><span class="annot"><span class="annottext">State# RealWorld -&gt; (# State# RealWorld, Int #)
</span><a href="#local-6989586621679032256"><span class="hs-identifier hs-var">io</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679032255"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032255"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">State# RealWorld -&gt; (# State# RealWorld, Int #)
</span><a href="#local-6989586621679032256"><span class="hs-identifier hs-var">io</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032255"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-587"></span><span>   </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032254"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032254"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#I%23"><span class="hs-identifier hs-type">I#</span></a></span><span> </span><span id="local-6989586621679032253"><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032253"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032254"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><a href="#local-6989586621679032253"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-588"></span><span>
</span><span id="line-589"></span><span class="annot"><a href="GHC.Num.Primitives.html#ioBool"><span class="hs-identifier hs-type">ioBool</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#State%23"><span class="hs-identifier hs-type">State#</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#RealWorld"><span class="hs-identifier hs-type">RealWorld</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.Primitives.html#Bool%23"><span class="hs-identifier hs-type">Bool#</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-590"></span><span id="ioBool"><span class="annot"><span class="annottext">ioBool :: IO Bool -&gt; State# RealWorld -&gt; (# State# RealWorld, Bool# #)
</span><a href="GHC.Num.Primitives.html#ioBool"><span class="hs-identifier hs-var hs-var">ioBool</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span id="local-6989586621679032252"><span class="annot"><span class="annottext">State# RealWorld -&gt; (# State# RealWorld, Bool #)
</span><a href="#local-6989586621679032252"><span class="hs-identifier hs-var">io</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679032251"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032251"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">State# RealWorld -&gt; (# State# RealWorld, Bool #)
</span><a href="#local-6989586621679032252"><span class="hs-identifier hs-var">io</span></a></span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032251"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-591"></span><span>   </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032250"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032250"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032250"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-592"></span><span>   </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621679032249"><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032249"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><span class="annottext">State# RealWorld
</span><a href="#local-6989586621679032249"><span class="hs-identifier hs-var">s'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">1#</span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-593"></span><span>
</span><span id="line-594"></span><span>
</span><span id="line-595"></span><span class="hs-comment">----------------------------------</span><span>
</span><span id="line-596"></span><span class="hs-comment">-- Exception</span><span>
</span><span id="line-597"></span><span class="hs-comment">----------------------------------</span><span>
</span><span id="line-598"></span><span>
</span><span id="line-599"></span><span class="hs-comment">-- Note [ghc-bignum exceptions]</span><span>
</span><span id="line-600"></span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-601"></span><span class="hs-comment">--</span><span>
</span><span id="line-602"></span><span class="hs-comment">-- `ghc-bignum` package can't depend on `base` package (it would create a cyclic</span><span>
</span><span id="line-603"></span><span class="hs-comment">-- dependency). Hence it can't import &quot;Control.Exception&quot; and throw exceptions</span><span>
</span><span id="line-604"></span><span class="hs-comment">-- the usual way. Instead it uses some wired-in functions from `ghc-prim` which</span><span>
</span><span id="line-605"></span><span class="hs-comment">-- themselves call wired-in functions from the RTS: raiseOverflow,</span><span>
</span><span id="line-606"></span><span class="hs-comment">-- raiseUnderflow, raiseDivZero.</span><span>
</span><span id="line-607"></span><span class="hs-comment">--</span><span>
</span><span id="line-608"></span><span class="hs-comment">-- We have to be careful when we want to throw an exception instead of returning</span><span>
</span><span id="line-609"></span><span class="hs-comment">-- an unlifted value (e.g. Word#, unboxed tuple, etc.). We have to ensure the</span><span>
</span><span id="line-610"></span><span class="hs-comment">-- evaluation of the exception throwing function before returning a dummy value,</span><span>
</span><span id="line-611"></span><span class="hs-comment">-- otherwise it will be removed by the simplifier as dead-code.</span><span>
</span><span id="line-612"></span><span class="hs-comment">--</span><span>
</span><span id="line-613"></span><span class="hs-comment">--    foo :: ... -&gt; Word#</span><span>
</span><span id="line-614"></span><span class="hs-comment">--    foo = ... case raiseDivZero of</span><span>
</span><span id="line-615"></span><span class="hs-comment">--                !_ -&gt; 0## -- the bang-pattern is necessary!</span><span>
</span><span id="line-616"></span><span class="hs-comment">--                          -- 0## is a dummy value (unreachable code)</span><span>
</span><span id="line-617"></span><span class="hs-comment">--</span><span>
</span><span id="line-618"></span><span>
</span><span id="line-619"></span><span class="annot"><a href="GHC.Num.Primitives.html#unexpectedValue_Int%23"><span class="hs-identifier hs-type">unexpectedValue_Int#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Void%23"><span class="hs-identifier hs-type">Void#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Int%23"><span class="hs-identifier hs-type">Int#</span></a></span><span>
</span><span id="line-620"></span><span id="unexpectedValue_Int%23"><span class="annot"><span class="annottext">unexpectedValue_Int# :: Void# -&gt; Bool#
</span><a href="GHC.Num.Primitives.html#unexpectedValue_Int%23"><span class="hs-identifier hs-var hs-var">unexpectedValue_Int#</span></a></span></span><span> </span><span class="annot"><span class="annottext">Void#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Any
forall a. a
</span><a href="GHC.Num.Primitives.html#unexpectedValue"><span class="hs-identifier hs-var">unexpectedValue</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-621"></span><span>   </span><span class="hs-glyph">!</span><span class="annot"><span class="annottext">Any
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool#
</span><span class="hs-number">0#</span></span><span> </span><span class="hs-comment">-- see Note [ghc-bignum exceptions]</span><span>
</span><span id="line-622"></span><span>
</span><span id="line-623"></span><span class="annot"><a href="GHC.Num.Primitives.html#unexpectedValue_Word%23"><span class="hs-identifier hs-type">unexpectedValue_Word#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Void%23"><span class="hs-identifier hs-type">Void#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-624"></span><span id="unexpectedValue_Word%23"><span class="annot"><span class="annottext">unexpectedValue_Word# :: Void# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#unexpectedValue_Word%23"><span class="hs-identifier hs-var hs-var">unexpectedValue_Word#</span></a></span></span><span> </span><span class="annot"><span class="annottext">Void#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Any
forall a. a
</span><a href="GHC.Num.Primitives.html#unexpectedValue"><span class="hs-identifier hs-var">unexpectedValue</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-625"></span><span>   </span><span class="hs-glyph">!</span><span class="annot"><span class="annottext">Any
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-comment">-- see Note [ghc-bignum exceptions]</span><span>
</span><span id="line-626"></span><span>
</span><span id="line-627"></span><span class="annot"><a href="GHC.Num.Primitives.html#raiseDivZero_Word%23"><span class="hs-identifier hs-type">raiseDivZero_Word#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Void%23"><span class="hs-identifier hs-type">Void#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-628"></span><span id="raiseDivZero_Word%23"><span class="annot"><span class="annottext">raiseDivZero_Word# :: Void# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#raiseDivZero_Word%23"><span class="hs-identifier hs-var hs-var">raiseDivZero_Word#</span></a></span></span><span> </span><span class="annot"><span class="annottext">Void#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Any
forall a. a
</span><a href="../../ghc-prim/src/GHC.Prim.Exception.html#raiseDivZero"><span class="hs-identifier hs-var">raiseDivZero</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-629"></span><span>   </span><span class="hs-glyph">!</span><span class="annot"><span class="annottext">Any
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-comment">-- see Note [ghc-bignum exceptions]</span><span>
</span><span id="line-630"></span><span>
</span><span id="line-631"></span><span class="annot"><a href="GHC.Num.Primitives.html#raiseUnderflow_Word%23"><span class="hs-identifier hs-type">raiseUnderflow_Word#</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Void%23"><span class="hs-identifier hs-type">Void#</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Prim.html#Word%23"><span class="hs-identifier hs-type">Word#</span></a></span><span>
</span><span id="line-632"></span><span id="raiseUnderflow_Word%23"><span class="annot"><span class="annottext">raiseUnderflow_Word# :: Void# -&gt; Word#
</span><a href="GHC.Num.Primitives.html#raiseUnderflow_Word%23"><span class="hs-identifier hs-var hs-var">raiseUnderflow_Word#</span></a></span></span><span> </span><span class="annot"><span class="annottext">Void#
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Any
forall a. a
</span><a href="../../ghc-prim/src/GHC.Prim.Exception.html#raiseUnderflow"><span class="hs-identifier hs-var">raiseUnderflow</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-633"></span><span>   </span><span class="hs-glyph">!</span><span class="annot"><span class="annottext">Any
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word#
</span><span class="hs-number">0##</span></span><span> </span><span class="hs-comment">-- see Note [ghc-bignum exceptions]</span><span class="hs-cpp">

#if (__GLASGOW_HASKELL__ &gt;= 811)
</span><span>
</span><span id="line-637"></span><span id="local-6989586621679032524"><span class="annot"><a href="GHC.Num.Primitives.html#unexpectedValue"><span class="hs-identifier hs-type">unexpectedValue</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679032524"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-638"></span><span id="unexpectedValue"><span class="annot"><span class="annottext">unexpectedValue :: forall a. a
</span><a href="GHC.Num.Primitives.html#unexpectedValue"><span class="hs-identifier hs-var hs-var">unexpectedValue</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
forall a. a
</span><a href="../../ghc-prim/src/GHC.Prim.Exception.html#raiseOverflow"><span class="hs-identifier hs-var">raiseOverflow</span></a></span><span class="hs-cpp">

#else
</span><span>
</span><span id="line-642"></span><span class="hs-comment">-- Before GHC 8.11 we use the exception trick taken from #14664</span><span>
</span><span id="line-643"></span><span class="hs-identifier">exception</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">a</span><span>
</span><span id="line-644"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="hs-pragma">exception</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-645"></span><span class="hs-identifier">exception</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">runRW#</span><span> </span><span class="hs-glyph">\</span><span class="hs-identifier">s</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-646"></span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="hs-identifier">atomicLoop</span><span> </span><span class="hs-identifier">s</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-647"></span><span>      </span><span class="hs-special">(#</span><span> </span><span class="hs-identifier">_</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">a</span><span> </span><span class="hs-special">#)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">a</span><span>
</span><span id="line-648"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-649"></span><span>      </span><span class="hs-identifier">atomicLoop</span><span> </span><span class="hs-identifier">s</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">atomically#</span><span> </span><span class="hs-identifier">atomicLoop</span><span> </span><span class="hs-identifier">s</span><span>
</span><span id="line-650"></span><span>
</span><span id="line-651"></span><span class="hs-identifier">raiseUnderflow</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">a</span><span>
</span><span id="line-652"></span><span class="hs-identifier">raiseUnderflow</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">exception</span><span>
</span><span id="line-653"></span><span>
</span><span id="line-654"></span><span class="hs-identifier">raiseDivZero</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">a</span><span>
</span><span id="line-655"></span><span class="hs-identifier">raiseDivZero</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">exception</span><span>
</span><span id="line-656"></span><span>
</span><span id="line-657"></span><span class="hs-identifier">unexpectedValue</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">a</span><span>
</span><span id="line-658"></span><span class="hs-identifier">unexpectedValue</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">exception</span><span class="hs-cpp">

#endif
</span></pre></body></html>